#include "Color.h"
#include "File.h"
#include <string>


Color::Color() : 
m_r(0.0f),
m_g(0.0f),
m_b(0.0f),
m_a(1.0f)
{}

Color::Color(float r, float g, float b, float a) : 
m_r(r),
m_g(g),
m_b(b),
m_a(a)
{}

void Color::SetAll(float r, float g, float b, float a)
{
    m_r = r;
    m_g = g;
    m_b = b;
    m_a = a;
}

void Color::Apply(bool alpha)
{
    
}

void Color::Neutralise()
{

}

void Color::SetWhite()
{
    m_r = m_g = m_b = 1.0f;
}
void Color::SetBlack()
{
    m_r = m_g = m_b = 0.0f;
}
bool Color::Load(File* f)
{
    std::string store;
    if(!f->GetString(&store))
        return false;
    m_r = File::StoF(store);
    if(!f->GetString(&store))
        return false;
    m_g = File::StoF(store);
    if(!f->GetString(&store))
        return false;
    m_b = File::StoF(store);
    if(!f->GetString(&store))
        return false;
    m_a = File::StoF(store);

    return true;
}
